aside.main-sidebar.debug.collapsed
    button.ui.button.main-sidebar-button
        i.home.icon
    | &nbsp;
    +if('isMenuOpen')
        | {{ yield }}
    //- debug-obj(obj="{{menu}}")
    nav.main-sidebar-navigation
        ul.sidebar-menu
            +each('menu:i')
                | {{#if .subMenu}}
                li.menu-item-has-submenu
                    .anchor(
                        on-click="@this.fire('toggleSubmenu', i)"
                        )
                        | {{#if .icon}}
                        icon.menu-item-icon(name="{{.icon}}")
                        | {{else}}
                        tag(size="0.7em" type="primary") {{ .title.substring(0,2) }}
                        | {{/if}}
                        span.menu-item-title
                            | {{ .title }}
                        icon.menu-item-dropdown.pull-right(name="chevron-{{#if submenuState[i]}}up{{else}}down{{/if}}")
                    ul.sub-menu(
                        class="{{#if submenuState[i] }}sub-menu-open{{/if}}"
                        )
                        +each('.subMenu')
                            li
                                a(href="{{ .url }}" class="{{#if selected === .url}}active{{/if}}")
                                    | {{#if .icon}}
                                    icon.menu-item-icon(name="{{.icon}}")
                                    | {{else}}
                                    tag(size="0.7em") {{ .title.substring(0,2) }}
                                    | {{/if}}
                                    span.menu-item-title {{ .title }}
                | {{else}}
                li
                    a(href="{{ .url }}" class="{{#if selected === .url}}active{{/if}}")
                        | {{#if .icon}}
                        icon.menu-item-icon(name="{{.icon}}")
                        | {{else}}
                        tag(size="0.7em" type="primary") {{ .title.substring(0,2) }}
                        | {{/if}}
                        span.menu-item-title
                            | {{ .title }}
                | {{/if}}
